<?php if (!defined('THINK_PATH')) exit(); if(is_array($nav)): $i = 0; $__LIST__ = $nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i; if(!empty($list['_child'])): ?><li class="dropdown">
    <a href="<?php echo U('Index/index',array('category'=>$list['id']));?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    <?php echo ($list["name"]); ?>
    <span class="caret"></span>
    </a>
    <ul class="dropdown-menu" role="menu">
        <?php if(is_array($list['_child'])): $i = 0; $__LIST__ = $list['_child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$child): $mod = ($i % 2 );++$i;?><li>
            <a href="<?php echo U('Index/index',array('category'=>$child['id']));?>"><?php echo ($child["name"]); ?></a>
        </li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
</li>
<?php else: ?>

<li <?php if($active == $list['id'] ): ?>class="active"<?php else: endif; ?>>
    <a href="<?php echo U('Index/index',array('category'=>$list['id']));?>"><?php echo ($list["name"]); ?></a>
</li><?php endif; endforeach; endif; else: echo "" ;endif; ?>